<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let nums1 = [1, 2, 3]
      let nums2 = [2, 5, 6]
      nums1.push(...nums2)
      for(let i = 0; i < nums1.length - 1; i++) {
        for(let j = 0;j <nums1.length - 1; j++) {
          if(nums1[j] > nums1[j+1]) { 
            let unm = nums1[j + 1]
            nums1[j+1] = nums1[j]
            nums1[j] = unm

          }
        
        }

      }
      console.log(nums1);
      
      // nums1.sort(function (a, b) {
      //    return a - b
      //   })
      //   console.log(nums1);
    </script>
  </body>
</html>
